import React from 'react'

interface IProps {
  onClick:()=>void
}

export const B:React.FC<IProps> = (props):JSX.Element=>{
  const {onClick} = props
  const handle = ():void=>{
    onClick && onClick()
  }

  console.log("B update");
  
  return (
    <button onClick={handle}>click B!</button>
  )
}

